﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;
using StudentModule.ViewModels;
using Microsoft.Practices.Prism.Regions;
using Infrastructure;

namespace StudentModule.Commands
{
    public class ShowDonViViewCommand : ICommand
    {
        #region Fields

        // Member variables
        private StudentManagerNavGroupViewModel viewModel;

        #endregion

        #region Constructor

        /// <summary>
        /// Default constructor.
        /// </summary>
        public ShowDonViViewCommand(StudentManagerNavGroupViewModel viewModel)
        {
            this.viewModel = viewModel;
        }

        #endregion

        #region ICommand Members

        /// <summary>
        /// Whether the ShowModuleBViewCommand is enabled.
        /// </summary>
        public bool CanExecute(object parameter)
        {
            return true;
        }

        /// <summary>
        /// Actions to take when CanExecute() changes.
        /// </summary>
        public event EventHandler CanExecuteChanged
        {
            add { CommandManager.RequerySuggested += value; }
            remove { CommandManager.RequerySuggested -= value; }
        }

        /// <summary>
        /// Executes the ShowModuleBViewCommand
        /// </summary>
        public void Execute(object parameter)
        {
            // Initialize
            var regionManager = new RegionManager();

            // Show Ribbon Tab
            var DonViView = new Uri("DonViView", UriKind.Relative);
            regionManager.RequestNavigate(RegionNames.ContentRegion, DonViView);

            /* We invoke the NavigationCompleted() callback method in the next  
             * navigation request since it is the last request we have to make. */

            // Show Workspace
            //var moduleBWorkspace = new Uri("ModuleBWorkspace", UriKind.Relative);
            //regionManager.RequestNavigate("WorkspaceRegion", moduleBWorkspace, NavigationCompleted);
        }

        #endregion

        #region Private Methods

        #endregion
    }
}
